public class Swapper
{
   /**
      This method swaps the first and second half of the given array.
      @param values an array
   */
   public void swapFirstAndSecondHalf(int[] values)
   {
      // your work here
      int l=values.length;
      if(l%2==0){
         for(int i=0;i<l/2;i++){
            int m=values[i];
            values[i]=values[i+l/2];
            values[i+l/2]=m;
         }
      }
      else{
         for(int i=0;i<(l-1)/2;i++){
            int m=values[i];
            values[i]=values[i+(l-1)/2];
            values[i+(l-1)/2]=m;
         }
      }


   }
   
   
   // This method is used to check your work
   public int[] check(int[] values)
   {
      swapFirstAndSecondHalf(values);
      return values;
   }
}